package com.cskaoyan.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author stone
 * @date 2022/11/15 21:13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BaseRespVo <T>{
    T data;
    String msg;
    int status;


    public static <T> BaseRespVo ok(T data){
        return new BaseRespVo(data, "成功", 200);
    }
    public static BaseRespVo ok(){
        return new BaseRespVo(null, "成功", 200);
    }
    public static BaseRespVo fail(){
        return new BaseRespVo(null, "失败", 500);
    }
}
